﻿using System.Runtime.Serialization;

namespace GoogleAPI.UrlShortener
{
    [DataContract]
    public class AnalyticsBase
    {
        /// <summary>
        /// Number of clicks on this short URL.
        /// </summary>
        [DataMember(Name = "shortUrlClicks")]
        public int ShortUrlClicks { get; set; }

        /// <summary>
        /// Number of clicks on all goo.gl short URLs pointing to this long URL.
        /// </summary>
        [DataMember(Name = "longUrlClicks")]
        public int LongUrlClicks { get; set; }

        /// <summary>
        /// Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
        /// </summary>
        [DataMember(Name = "referrers")]
        public CountIdPair[] Referrers { get; set; }

        /// <summary>
        /// Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. 
        /// Only present if this data is available.
        /// </summary>
        [DataMember(Name = "countries")]
        public CountIdPair[] Countries { get; set; }

        /// <summary>
        /// Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
        /// </summary>
        [DataMember(Name = "browsers")]
        public CountIdPair[] Browsers { get; set; }

        /// <summary>
        /// Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
        /// </summary>
        [DataMember(Name = "platforms")]
        public CountIdPair[] Platforms { get; set; }
    }
}
